/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * RegistrarLotes.java
 *
 * Created on 28/06/2011, 02:37:43 AM
 */

package GUI;
import Interfaz.InterfazControl;
import Motor.Empleado;
import javax.swing.ImageIcon;
/**
 *
 * @author Davielis
 */
public class RegistrarLotes extends javax.swing.JFrame {

    /** Creates new form RegistrarLotes
	 *
	 */
	private InterfazControl laInterfaz;
	private  Empleado empleado1;
    public RegistrarLotes(InterfazControl laInterfaz, Empleado empleado) {
        this.laInterfaz=laInterfaz;
        initComponents();
		empleado1 = empleado;
		this.setLocationRelativeTo(null); // Cambiar icono de java en ventana
        this.setIconImage(new ImageIcon("src/imagenes/marketplus2.png").getImage());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jTIdProducto = new javax.swing.JTextField();
        jTRegistrar = new javax.swing.JToggleButton();
        jLabel14 = new javax.swing.JLabel();
        jTCantidadProducto = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jTStockMinimo = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jTBuscar1 = new javax.swing.JToggleButton();
        jTRetornar = new javax.swing.JToggleButton();
        jLabel4 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jDateChooser1 = new com.toedter.calendar.JDateChooser();
        jDateChooser2 = new com.toedter.calendar.JDateChooser();
        jRhabilitado = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jLabel8 = new javax.swing.JLabel();
        jTSalir = new javax.swing.JToggleButton();
        jTEliminar2 = new javax.swing.JToggleButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(700, 480));
        setResizable(false);
        getContentPane().setLayout(null);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/marketplus.png"))); // NOI18N
        getContentPane().add(jLabel2);
        jLabel2.setBounds(20, 10, 100, 94);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/imagenlote1.jpg"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(20, 110, 240, 170);

        jLabel5.setText("ID Lote:");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(270, 110, 90, 30);

        jTIdProducto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTIdProductoActionPerformed(evt);
            }
        });
        jTIdProducto.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTIdProductoKeyReleased(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTIdProductoKeyTyped(evt);
            }
        });
        getContentPane().add(jTIdProducto);
        jTIdProducto.setBounds(400, 120, 120, 20);

        jTRegistrar.setText("Registrar");
        getContentPane().add(jTRegistrar);
        jTRegistrar.setBounds(270, 370, 105, 23);

        jLabel14.setText("Cantidad de Producto:");
        getContentPane().add(jLabel14);
        jLabel14.setBounds(270, 160, 140, 20);

        jTCantidadProducto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTCantidadProductoActionPerformed(evt);
            }
        });
        jTCantidadProducto.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTCantidadProductoKeyTyped(evt);
            }
        });
        getContentPane().add(jTCantidadProducto);
        jTCantidadProducto.setBounds(400, 160, 230, 20);

        jLabel16.setText("Stock Mínimo:");
        getContentPane().add(jLabel16);
        jLabel16.setBounds(270, 200, 140, 20);

        jTStockMinimo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTStockMinimoKeyTyped(evt);
            }
        });
        getContentPane().add(jTStockMinimo);
        jTStockMinimo.setBounds(400, 200, 230, 20);

        jLabel6.setText("Fecha de Vencimiento:");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(270, 270, 170, 20);

        jTBuscar1.setText("Buscar");
        getContentPane().add(jTBuscar1);
        jTBuscar1.setBounds(530, 120, 105, 23);

        jTRetornar.setText("Ir a Gerente");
        jTRetornar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTRetornarActionPerformed(evt);
            }
        });
        getContentPane().add(jTRetornar);
        jTRetornar.setBounds(520, 370, 105, 23);

        jLabel4.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24));
        jLabel4.setText("Registrar Lotes");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(240, 40, 190, 40);

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 10));
        jLabel11.setText("RIF: J-122231245          Desarrollado por: Group Delivery");
        getContentPane().add(jLabel11);
        jLabel11.setBounds(190, 430, 320, 20);

        jLabel7.setText("Fecha Emisión:");
        getContentPane().add(jLabel7);
        jLabel7.setBounds(270, 240, 170, 20);
        getContentPane().add(jDateChooser1);
        jDateChooser1.setBounds(400, 270, 230, 20);
        getContentPane().add(jDateChooser2);
        jDateChooser2.setBounds(400, 240, 230, 20);

        buttonGroup1.add(jRhabilitado);
        jRhabilitado.setText("Habilitado");
        jRhabilitado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRhabilitadoActionPerformed(evt);
            }
        });
        getContentPane().add(jRhabilitado);
        jRhabilitado.setBounds(400, 300, 130, 23);

        buttonGroup1.add(jRadioButton2);
        jRadioButton2.setText("Deshabilitado");
        jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2ActionPerformed(evt);
            }
        });
        getContentPane().add(jRadioButton2);
        jRadioButton2.setBounds(400, 330, 120, 23);

        jLabel8.setText("Status de lote:");
        getContentPane().add(jLabel8);
        jLabel8.setBounds(270, 320, 90, 30);

        jTSalir.setFont(new java.awt.Font("Tahoma", 1, 11));
        jTSalir.setText("Salir del Sistema");
        jTSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTSalirActionPerformed(evt);
            }
        });
        getContentPane().add(jTSalir);
        jTSalir.setBounds(360, 400, 210, 23);

        jTEliminar2.setText("Eliminar");
        getContentPane().add(jTEliminar2);
        jTEliminar2.setBounds(400, 370, 105, 23);

        pack();
    }// </editor-fold>//GEN-END:initComponents

	private void jTCantidadProductoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTCantidadProductoKeyTyped
		// TODO add your handling code here:
		char c = evt.getKeyChar();
		if (Character.isDigit(c)== false)
			evt.consume();
	}//GEN-LAST:event_jTCantidadProductoKeyTyped

	private void jTRetornarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTRetornarActionPerformed
		// TODO add your handling code here:
		Gerente iraGerente=new Gerente(laInterfaz, empleado1);
		iraGerente.setVisible(true);
		this.dispose();
}//GEN-LAST:event_jTRetornarActionPerformed

	private void jTSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTSalirActionPerformed
		// TODO add your handling code here:
		this.dispose();
	}//GEN-LAST:event_jTSalirActionPerformed

	private void jTIdProductoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTIdProductoActionPerformed
		// TODO add your handling code here:

	}//GEN-LAST:event_jTIdProductoActionPerformed

	private void jTIdProductoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTIdProductoKeyTyped
		// TODO add your handling code here:
		char c = evt.getKeyChar();
        if (Character.isDigit(c)== false)
        evt.consume();
	}//GEN-LAST:event_jTIdProductoKeyTyped

	private void jTIdProductoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTIdProductoKeyReleased
		// TODO add your handling code here:
	}//GEN-LAST:event_jTIdProductoKeyReleased

	private void jTCantidadProductoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTCantidadProductoActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_jTCantidadProductoActionPerformed

	private void jTStockMinimoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTStockMinimoKeyTyped
		// TODO add your handling code here:
		char c = evt.getKeyChar();
        if (Character.isDigit(c)== false)
        evt.consume();
	}//GEN-LAST:event_jTStockMinimoKeyTyped

	private void jRhabilitadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRhabilitadoActionPerformed
		// TODO add your handling code here:
		
}//GEN-LAST:event_jRhabilitadoActionPerformed

	private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
		// TODO add your handling code here:
}//GEN-LAST:event_jRadioButton2ActionPerformed

    /**
    * @param args the command line arguments
    */
   
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private com.toedter.calendar.JDateChooser jDateChooser1;
    private com.toedter.calendar.JDateChooser jDateChooser2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRhabilitado;
    private javax.swing.JToggleButton jTBuscar1;
    private javax.swing.JTextField jTCantidadProducto;
    private javax.swing.JToggleButton jTEliminar2;
    private javax.swing.JTextField jTIdProducto;
    private javax.swing.JToggleButton jTRegistrar;
    private javax.swing.JToggleButton jTRetornar;
    private javax.swing.JToggleButton jTSalir;
    private javax.swing.JTextField jTStockMinimo;
    // End of variables declaration//GEN-END:variables

}
